package com.vianer.mybatisxml;


import com.vianer.mybatisxml.mapper.UserMapper;
import com.vianer.mybatisxml.model.User;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class UserMapperTester {

    @Autowired
    private UserMapper userMapper;

    @Test
    public void testInsert() throws Exception{
        userMapper.insert(new User("vianer","123456",8L,1));
    }

    @Test
    public void testGet(){
        User user = userMapper.get(2L);
        System.out.println("userName:"+user.getUserName());
    }
}
